﻿@using DonutMgmtSystemFoundation.Helpers
@using ViewRes

@section Styles{
    <link href="@Url.Content("~/css/fullcalendar.css")" rel="stylesheet" />
}

@section Scripts{
    <script type="text/javascript" src="@Url.Content("~/javascript/fullcalendar.js")"></script>
    <script type="text/javascript">
        $(function () {
            $(".calendar.icon").parent().addClass("active");

            @if(SessionContext.GetLanguage() == "es-mx")
            {
                <text>
                var localOptions = {
	                    buttonText: {
		                    today: 'Hoy',
		                    month: 'Mes',
		                    day: 'D&iacute;a',
		                    week: 'Semana'
	                    },
	                    monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
	                    monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sept','Oct','Nov','Dic'],
	                    dayNames: ['Domingo','Lunes','Martes','Miercoles','Jueves','Viernes','Sabado'],
	                    dayNamesShort: ['Do','Lu','Mar','Mie','Jue','Vie','Sa']
                }
                $('#calendar').fullCalendar($.extend({
                    eventSources: [
                        {
                            url: "@Url.Action("GetEvents","Calendar")",
                            type: 'POST'
                        }
                    ]
                }, localOptions));
            </text>
            }else{
                <text>
                $('#calendar').fullCalendar({
                    eventSources: [
                        {
                            url: "@Url.Action("GetEvents","Calendar")",
                            type: 'POST'
                        }
                    ]
                    });
            </text>
            }
        });
    </script>
}

@section Title{
    @Calendar.Title
}

@section Pagename{
    @Calendar.Title
}

<div id="calendar" style="max-width:800px; margin:auto;">
</div>
